{
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "#  Parameter Optimization"
      ],
      "metadata": {
        "nteract": {
          "transient": {
            "deleting": false
          }
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "import pandas as pd\n",
        "\n",
        "import warnings\n",
        "warnings.filterwarnings(\"ignore\")\n",
        "\n",
        "import yfinance as yf\n",
        "yf.pdr_override()"
      ],
      "outputs": [],
      "execution_count": 1,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2020-07-29T01:31:02.204Z",
          "iopub.execute_input": "2020-07-29T01:31:02.210Z",
          "iopub.status.idle": "2020-07-29T01:31:03.120Z",
          "shell.execute_reply": "2020-07-29T01:31:03.150Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# input\n",
        "symbol = 'AMD'\n",
        "start = '2014-01-01'\n",
        "end = '2018-08-27'\n",
        "\n",
        "# Read data \n",
        "dataset = yf.download(symbol,start,end)\n",
        "\n",
        "# View Columns\n",
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "[*********************100%***********************]  1 of 1 completed\n"
          ]
        },
        {
          "output_type": "execute_result",
          "execution_count": 2,
          "data": {
            "text/plain": "            Adj Close  Close  High   Low  Open    Volume\nDate                                                    \n2014-01-02       3.95   3.95  3.98  3.84  3.85  20548400\n2014-01-03       4.00   4.00  4.00  3.88  3.98  22887200\n2014-01-06       4.13   4.13  4.18  3.99  4.01  42398300\n2014-01-07       4.18   4.18  4.25  4.11  4.19  42932100\n2014-01-08       4.18   4.18  4.26  4.14  4.23  30678700",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Adj Close</th>\n      <th>Close</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Open</th>\n      <th>Volume</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2014-01-02</th>\n      <td>3.95</td>\n      <td>3.95</td>\n      <td>3.98</td>\n      <td>3.84</td>\n      <td>3.85</td>\n      <td>20548400</td>\n    </tr>\n    <tr>\n      <th>2014-01-03</th>\n      <td>4.00</td>\n      <td>4.00</td>\n      <td>4.00</td>\n      <td>3.88</td>\n      <td>3.98</td>\n      <td>22887200</td>\n    </tr>\n    <tr>\n      <th>2014-01-06</th>\n      <td>4.13</td>\n      <td>4.13</td>\n      <td>4.18</td>\n      <td>3.99</td>\n      <td>4.01</td>\n      <td>42398300</td>\n    </tr>\n    <tr>\n      <th>2014-01-07</th>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>4.25</td>\n      <td>4.11</td>\n      <td>4.19</td>\n      <td>42932100</td>\n    </tr>\n    <tr>\n      <th>2014-01-08</th>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>4.26</td>\n      <td>4.14</td>\n      <td>4.23</td>\n      <td>30678700</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 2,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2020-07-29T01:31:03.129Z",
          "iopub.execute_input": "2020-07-29T01:31:03.136Z",
          "iopub.status.idle": "2020-07-29T01:31:04.347Z",
          "shell.execute_reply": "2020-07-29T01:31:04.481Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "dataset['Increase_Decrease'] = np.where(dataset['Volume'].shift(-1) > dataset['Volume'],1,0)\n",
        "dataset['Buy_Sell_on_Open'] = np.where(dataset['Open'].shift(-1) > dataset['Open'],1,0)\n",
        "dataset['Buy_Sell'] = np.where(dataset['Adj Close'].shift(-1) > dataset['Adj Close'],1,0)\n",
        "dataset['Returns'] = dataset['Adj Close'].pct_change()\n",
        "dataset = dataset.dropna()"
      ],
      "outputs": [],
      "execution_count": 3,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2020-07-29T01:31:04.364Z",
          "iopub.execute_input": "2020-07-29T01:31:04.374Z",
          "iopub.status.idle": "2020-07-29T01:31:04.386Z",
          "shell.execute_reply": "2020-07-29T01:31:04.485Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 4,
          "data": {
            "text/plain": "            Adj Close  Close  High   Low  Open    Volume  Increase_Decrease  \\\nDate                                                                          \n2014-01-03       4.00   4.00  4.00  3.88  3.98  22887200                  1   \n2014-01-06       4.13   4.13  4.18  3.99  4.01  42398300                  1   \n2014-01-07       4.18   4.18  4.25  4.11  4.19  42932100                  0   \n2014-01-08       4.18   4.18  4.26  4.14  4.23  30678700                  0   \n2014-01-09       4.09   4.09  4.23  4.05  4.20  30667600                  0   \n\n            Buy_Sell_on_Open  Buy_Sell   Returns  \nDate                                              \n2014-01-03                 1         1  0.012658  \n2014-01-06                 1         1  0.032500  \n2014-01-07                 1         0  0.012106  \n2014-01-08                 0         0  0.000000  \n2014-01-09                 0         1 -0.021531  ",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Adj Close</th>\n      <th>Close</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Open</th>\n      <th>Volume</th>\n      <th>Increase_Decrease</th>\n      <th>Buy_Sell_on_Open</th>\n      <th>Buy_Sell</th>\n      <th>Returns</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2014-01-03</th>\n      <td>4.00</td>\n      <td>4.00</td>\n      <td>4.00</td>\n      <td>3.88</td>\n      <td>3.98</td>\n      <td>22887200</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.012658</td>\n    </tr>\n    <tr>\n      <th>2014-01-06</th>\n      <td>4.13</td>\n      <td>4.13</td>\n      <td>4.18</td>\n      <td>3.99</td>\n      <td>4.01</td>\n      <td>42398300</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.032500</td>\n    </tr>\n    <tr>\n      <th>2014-01-07</th>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>4.25</td>\n      <td>4.11</td>\n      <td>4.19</td>\n      <td>42932100</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0.012106</td>\n    </tr>\n    <tr>\n      <th>2014-01-08</th>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>4.26</td>\n      <td>4.14</td>\n      <td>4.23</td>\n      <td>30678700</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0.000000</td>\n    </tr>\n    <tr>\n      <th>2014-01-09</th>\n      <td>4.09</td>\n      <td>4.09</td>\n      <td>4.23</td>\n      <td>4.05</td>\n      <td>4.20</td>\n      <td>30667600</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>-0.021531</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 4,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2020-07-29T01:31:04.398Z",
          "iopub.execute_input": "2020-07-29T01:31:04.405Z",
          "iopub.status.idle": "2020-07-29T01:31:04.419Z",
          "shell.execute_reply": "2020-07-29T01:31:05.099Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "dataset.tail()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 5,
          "data": {
            "text/plain": "            Adj Close      Close   High        Low       Open     Volume  \\\nDate                                                                       \n2018-08-20  19.980000  19.980000  20.08  19.350000  19.790001   62983200   \n2018-08-21  20.400000  20.400000  20.42  19.860001  19.980000   55629000   \n2018-08-22  20.900000  20.900000  20.92  20.209999  20.280001   62002700   \n2018-08-23  22.290001  22.290001  22.32  21.139999  21.190001  113444100   \n2018-08-24  23.980000  23.980000  24.00  22.670000  22.910000  164328200   \n\n            Increase_Decrease  Buy_Sell_on_Open  Buy_Sell   Returns  \nDate                                                                 \n2018-08-20                  0                 1         1  0.010622  \n2018-08-21                  1                 1         1  0.021021  \n2018-08-22                  1                 1         1  0.024510  \n2018-08-23                  1                 1         1  0.066507  \n2018-08-24                  0                 0         0  0.075819  ",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Adj Close</th>\n      <th>Close</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Open</th>\n      <th>Volume</th>\n      <th>Increase_Decrease</th>\n      <th>Buy_Sell_on_Open</th>\n      <th>Buy_Sell</th>\n      <th>Returns</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2018-08-20</th>\n      <td>19.980000</td>\n      <td>19.980000</td>\n      <td>20.08</td>\n      <td>19.350000</td>\n      <td>19.790001</td>\n      <td>62983200</td>\n      <td>0</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.010622</td>\n    </tr>\n    <tr>\n      <th>2018-08-21</th>\n      <td>20.400000</td>\n      <td>20.400000</td>\n      <td>20.42</td>\n      <td>19.860001</td>\n      <td>19.980000</td>\n      <td>55629000</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.021021</td>\n    </tr>\n    <tr>\n      <th>2018-08-22</th>\n      <td>20.900000</td>\n      <td>20.900000</td>\n      <td>20.92</td>\n      <td>20.209999</td>\n      <td>20.280001</td>\n      <td>62002700</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.024510</td>\n    </tr>\n    <tr>\n      <th>2018-08-23</th>\n      <td>22.290001</td>\n      <td>22.290001</td>\n      <td>22.32</td>\n      <td>21.139999</td>\n      <td>21.190001</td>\n      <td>113444100</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.066507</td>\n    </tr>\n    <tr>\n      <th>2018-08-24</th>\n      <td>23.980000</td>\n      <td>23.980000</td>\n      <td>24.00</td>\n      <td>22.670000</td>\n      <td>22.910000</td>\n      <td>164328200</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0.075819</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 5,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2020-07-29T01:31:04.428Z",
          "iopub.execute_input": "2020-07-29T01:31:04.433Z",
          "iopub.status.idle": "2020-07-29T01:31:04.445Z",
          "shell.execute_reply": "2020-07-29T01:31:05.104Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn import linear_model, decomposition\n",
        "from sklearn.pipeline import Pipeline\n",
        "from sklearn.model_selection import GridSearchCV, cross_val_score\n",
        "from sklearn.preprocessing import StandardScaler"
      ],
      "outputs": [],
      "execution_count": 6,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2020-07-29T01:31:04.454Z",
          "iopub.execute_input": "2020-07-29T01:31:04.459Z",
          "iopub.status.idle": "2020-07-29T01:31:04.981Z",
          "shell.execute_reply": "2020-07-29T01:31:05.108Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "X = dataset.drop([\"Buy_Sell\"], axis=1)\n",
        "y = dataset[\"Buy_Sell\"]"
      ],
      "outputs": [],
      "execution_count": 7,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2020-07-29T01:31:04.989Z",
          "iopub.execute_input": "2020-07-29T01:31:04.997Z",
          "iopub.status.idle": "2020-07-29T01:31:05.010Z",
          "shell.execute_reply": "2020-07-29T01:31:05.111Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Create an scaler object\n",
        "sc = StandardScaler()\n",
        "\n",
        "# Create a pca object\n",
        "pca = decomposition.PCA()\n",
        "\n",
        "# Create a logistic regression object with an L2 penalty\n",
        "logistic = linear_model.LogisticRegression()\n",
        "\n",
        "# Create a pipeline in three steps. \n",
        "# 1. Standardize the data.\n",
        "# 2. Tranform the data with PCA.\n",
        "# 3. Train a logistic regression on the data.\n",
        "pipe = Pipeline(steps=[('sc', sc), \n",
        "                       ('pca', pca), \n",
        "                       ('logistic', logistic)])"
      ],
      "outputs": [],
      "execution_count": 8,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2020-07-29T01:31:05.018Z",
          "iopub.execute_input": "2020-07-29T01:31:05.025Z",
          "iopub.status.idle": "2020-07-29T01:31:05.038Z",
          "shell.execute_reply": "2020-07-29T01:31:05.115Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Create a list of a sequence of integers from 1 to 30 (the number of features in X + 1)\n",
        "n_components = list(range(1,X.shape[1]+1,1))\n",
        "\n",
        "# Create a list of values of the regularization parameter\n",
        "C = np.logspace(-4, 4, 50)\n",
        "\n",
        "# Create a list of options for the regularization penalty\n",
        "penalty = ['l1', 'l2']\n",
        "\n",
        "# Create a dictionary of all the parameter options \n",
        "# Note has you can access the parameters of steps of a pipeline by using '__’\n",
        "parameters = dict(pca__n_components=n_components, \n",
        "                  logistic__C=C,\n",
        "                  logistic__penalty=penalty)"
      ],
      "outputs": [],
      "execution_count": 9,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2020-07-29T01:31:05.047Z",
          "iopub.execute_input": "2020-07-29T01:31:05.055Z",
          "iopub.status.idle": "2020-07-29T01:31:05.067Z",
          "shell.execute_reply": "2020-07-29T01:32:55.850Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Create a grid search object\n",
        "clf = GridSearchCV(pipe, parameters)\n",
        "\n",
        "# Fit the grid search\n",
        "clf.fit(X, y)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 10,
          "data": {
            "text/plain": "GridSearchCV(cv='warn', error_score='raise-deprecating',\n       estimator=Pipeline(memory=None,\n     steps=[('sc', StandardScaler(copy=True, with_mean=True, with_std=True)), ('pca', PCA(copy=True, iterated_power='auto', n_components=None, random_state=None,\n  svd_solver='auto', tol=0.0, whiten=False)), ('logistic', LogisticRegression(C=1.0, class_weight=None, du...enalty='l2', random_state=None, solver='warn',\n          tol=0.0001, verbose=0, warm_start=False))]),\n       fit_params=None, iid='warn', n_jobs=None,\n       param_grid={'pca__n_components': [1, 2, 3, 4, 5, 6, 7, 8, 9], 'logistic__C': array([1.00000e-04, 1.45635e-04, 2.12095e-04, 3.08884e-04, 4.49843e-04,\n       6.55129e-04, 9.54095e-04, 1.38950e-03, 2.02359e-03, 2.94705e-03,\n       4.29193e-03, 6.25055e-03, 9.10298e-03, 1.32571e-02, 1.93070e-02,\n       ....22300e+03, 3.23746e+03, 4.71487e+03, 6.86649e+03, 1.00000e+04]), 'logistic__penalty': ['l1', 'l2']},\n       pre_dispatch='2*n_jobs', refit=True, return_train_score='warn',\n       scoring=None, verbose=0)"
          },
          "metadata": {}
        }
      ],
      "execution_count": 10,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2020-07-29T01:31:05.078Z",
          "iopub.execute_input": "2020-07-29T01:31:05.084Z",
          "iopub.status.idle": "2020-07-29T01:31:32.531Z",
          "shell.execute_reply": "2020-07-29T01:32:55.854Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "print('Pipelines With Parameter Optimization')\n",
        "print('Best Penalty:', clf.best_estimator_.get_params()['logistic__penalty'])\n",
        "print('Best C:', clf.best_estimator_.get_params()['logistic__C'])\n",
        "print('Best Number Of Components:', clf.best_estimator_.get_params()['pca__n_components'])"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Pipelines With Parameter Optimization\n",
            "Best Penalty: l1\n",
            "Best C: 16.768329368110066\n",
            "Best Number Of Components: 8\n"
          ]
        }
      ],
      "execution_count": 11,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2020-07-29T01:31:32.544Z",
          "iopub.execute_input": "2020-07-29T01:31:32.553Z",
          "iopub.status.idle": "2020-07-29T01:31:32.573Z",
          "shell.execute_reply": "2020-07-29T01:32:55.859Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "print('Fit the grid search using 3-Fold cross validation')\n",
        "cross_val_score(clf, X, y)"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Fit the grid search using 3-Fold cross validation\n"
          ]
        },
        {
          "output_type": "execute_result",
          "execution_count": 12,
          "data": {
            "text/plain": "array([0.50639386, 0.53076923, 0.55012853])"
          },
          "metadata": {}
        }
      ],
      "execution_count": 12,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2020-07-29T01:31:32.589Z",
          "iopub.execute_input": "2020-07-29T01:31:32.595Z",
          "iopub.status.idle": "2020-07-29T01:32:55.826Z",
          "shell.execute_reply": "2020-07-29T01:32:55.862Z"
        }
      }
    }
  ],
  "metadata": {
    "kernel_info": {
      "name": "python3"
    },
    "language_info": {
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "pygments_lexer": "ipython3",
      "file_extension": ".py",
      "version": "3.5.5"
    },
    "kernelspec": {
      "argv": [
        "C:\\Users\\Tin Hang\\Anaconda3\\envs\\py35\\python.exe",
        "-m",
        "ipykernel_launcher",
        "-f",
        "{connection_file}"
      ],
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "nteract": {
      "version": "0.24.0"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}